Configuring Log File Search Data Source Properties
The Log File Search data source performs a search on a log file for each data source. The results of the search are returned in the data package. The log file can be local or remote to the Collector, and will use Windows impersonation if credentials are entered on the connection tab of the data source.
Data Package
The data package is matched to the File Access Wizard /Test through the following:
- Server name
- Log File Path and Name
Sample Data Packet file name:
DataPackage.LogFileSearch_<server_name>_<full_file_path_name>.Xml
Properties
LogFile. The log file path and name. Wildcards can be used to search multiple log files in a folder. If wildcards are used, then the last write date is first checked on the file to determine if needed to process the log records. If wildcards are used then a FileAccess data package listing the files is automatically generated and sent to the server. Variables <%=FileDate%> or <%=Today%> can be used in the name to create a log file name with a date stamp. The FileDate variable uses the FileDateOffset to adjust the date with 0 (zero) meaning today, -1 meaning yesterday. Example file name: filename_<%=FileDate%>_*.log.
FileDatePattern. The date time pattern for the FileDate variable.
FileDateOffset. The date offset with 0 (zero) meaning today, -1 meaning yesterday.
SearchTest. The text to search for in the log records.
SearchRegExp. The regular expression to use for searching instead of the search text.
MaxErrors. The maximum number of error log records to return. A value of -1 indicates no maximum number.
MinutesOld. The oldest record in minutes to search.
DateTimeRegExp. The regular expression used to parse the date time from the log record if minutes old is greater than 0.
DateTimePattern. The date time pattern used to read the date time value from the date time regular expression result.
Note: The variable <%=Today%> can be used to create daily log file names. For example: \\kx-90-001\Capture\Logs\KTM_<%=Today%>.txt
Was this helpful?
Please tell us why:
Thank you.